package com.csist.service.po.userModule.impl;

import com.csist.mapper.po.userModule.UserTypeMapper;
import com.csist.pojo.po.userModule.UserType;
import com.csist.service.po.userModule.UserTypeService;
import com.csist.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Collections;
import java.util.List;

/**
 * @ClassName UserTypeServiceImpl
 * @Description 【自行描述】
 * @Author cn
 * @Date 2024/7/2 上午9:28
 * @Version 1.0
 */
public class UserTypeServiceImpl implements UserTypeService {
    private SqlSession sqlSession;
    private UserTypeMapper userTypeMapper;

    public UserTypeServiceImpl() {
        sqlSession = SqlSessionUtil.openSession();
        userTypeMapper = sqlSession.getMapper(UserTypeMapper.class);
    }

    @Override
    public List<UserType> findAll() {
        return Collections.emptyList();
    }

    @Override
    public List<UserType> searchUserTypeByColumn(UserType userType) {
        List<UserType> list = userTypeMapper.searchUserTypeByColumn(userType);
        if (list != null && list.size() > 0) {
            return list;
        }
        return null;
    }

    @Override
    public UserType getUserTypeById(int id) {
        return null;
    }

    @Override
    public int addUserType(UserType userType) {
        return 0;
    }

    @Override
    public int updateUserType(UserType userType) {
        return 0;
    }

    @Override
    public int deleteUserType(int uiId) {
        return 0;
    }
}
